package com.tnr.dao;

import java.util.List;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import com.tnr.dto.EmployeeDto;
import com.tnr.model.Employee;

@Mapper
public interface EmployeeDao {
	//锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟角筹拷锟矫碉拷dao锟斤拷亩锟斤拷锟�  锟斤拷锟角伙拷锟斤拷锟斤拷锟斤拷锟捷诧拷询锟斤拷锟斤拷使锟斤拷
	//@Select("SELECT * FROM emplooy")
	List<Employee> findEmployeeList(EmployeeDto dto);

	
	//锟斤拷锟斤拷id锟斤拷删锟斤拷锟斤拷息锟斤拷   param锟角革拷锟斤拷锟斤拷锟斤拷锟斤拷锟�  String...锟斤拷指锟矫凤拷锟斤拷锟斤拷什么锟斤拷锟斤拷锟斤拷
	int deleteEmployeesByIds(@Param("ids") String... eids);


	@Insert("INSERT INTO emplooy(NAME,age,DATE,money) VALUES(#{name},#{age},#{date},#{money})")
	int saveEmployees(EmployeeDto dto);
	
	@Update("UPDATE emplooy SET `name`=#{name},age=#{age},date=#{date},money=#{money} WHERE id=#{id}")
	int updateEmployees(EmployeeDto dto);
}
